package upload.feign;

import com.unknowpupil.configuration.interceptor.FeignRequestInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件上传。
 * @Classname: UploadFeign
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/1/5 0:26
 * @Description:
 * @Version: 1.0
 */
@FeignClient(value = "public-cloud-upload-server",path = "upload",configuration = FeignRequestInterceptor.class)
public interface UploadFeign {
    /**
     * 功能描述: <br>
     * 〈文件上传〉
     *
     * @param: multipartFile {@code MultipartFile}
     * @since: 1.0.0
     * @auther: w10g
     * @return: {@code String} 文件上传路径
     * @Date: 2020/1/5 0:28
     */
    @PostMapping(value="")
    String upload(@RequestPart(value = "multipartFile") MultipartFile multipartFile);
}
